﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class admin_qljobdetail : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
    {

    }
    protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
    {
        e.Cancel = true;
        Label id = (Label)this.GridView1.Rows[e.NewEditIndex].Cells[0].FindControl("id");
        Label lang = (Label)this.GridView1.Rows[e.NewEditIndex].Cells[1].FindControl("lang");
        Response.Redirect("Default.aspx?page=edjobdetail&id=" + id.Text + "&lang=" + lang.Text);
    }
    protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e)
    {

    }
    protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
    {
        e.Cancel = true;
        Response.Write(Common.confirmDelete(null));
        e.Cancel = false;
    }
    private void reset()
    {
        SqlDataSource3.DataBind();
        ddlID.DataBind();
    }
    protected void addbt_Click(object sender, EventArgs e)
    {
        hdfContent.Value = fckContent.Value;
        hdfDes.Value = fckDes.Value;
        hdfDetailID.Value = Common.createID().ToString();
        SqlDataSource2.Insert();
        SqlDataSource2.DataBind();
        //Response.Write("<script>alert('Insert Thành Công')</script>");
        menu.Text = "";
        fckDes.Value = "";
        fckContent.Value = "";
        title.Text = "";
        ddlID.SelectedIndex = 0;
        ddlLang.SelectedIndex = 0;
        //Response.Redirect("Default.aspx?page=qljobdetail");
        
    }
}